////////////////////////////////////////////////////////////////////////////////
//
//  MICROSOFT CORPORATION
//  Copyright (c) Microsoft Corporation.
//  All Rights Reserved.
//
//  NOTICE: Microsoft Confidential. Intended for Internal Use Only.
//
////////////////////////////////////////////////////////////////////////////////

package com.msn.beet.loaders
{

import com.msn.beet.errors.UnsupportedMethodException;
import flash.system.LoaderContext;

import flash.events.IEventDispatcher;
import flash.utils.getQualifiedClassName;

/**
 * The AbstractLoader abstract class forms the base of all components in
 * the loader composite.
 */
public class AbstractLoader implements IEventDispatcher
{
    include "../core/Version.as";
    include "../events/EventDispatcherMixin.as";

//--------------------------------------------------------------------------
//
//  Abstract Properties
//
//--------------------------------------------------------------------------

    /**
     * Abstract property.
     */
    public function get url():String
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract property.
     */
    public function set url(value:String):void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract property.
     */
    public function get content():*
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract property.
     */
    public function get bytesLoaded():uint
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract property.
     */
    public function get bytesTotal():uint
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract property for LoaderContext
     */
    public function get loaderContext():LoaderContext
    {
        throw new UnsupportedMethodException();
    }
    
    /**
     * Abstract property for LoaderContext
     */
    public function set loaderContext(value:LoaderContext):void
    {
        throw new UnsupportedMethodException();
    }
    
//--------------------------------------------------------------------------
//
//  Constructor
//
//--------------------------------------------------------------------------

    /**
     * Abstract class defines interface for asset loading composites and
     * leaves.
     *
     * @param self Prevents class from being instantiated.
     */
    public function AbstractLoader(self:AbstractLoader)
    {
        if (self != this)
        {
            throw new ArgumentError(getQualifiedClassName(this) +
                                    " cannot be instantiated.");
        }
    }

//--------------------------------------------------------------------------
//
//  Methods
//
//--------------------------------------------------------------------------

    /**
     * Abstract method.
     */
    public function start():void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function stop():void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function pause():void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function add(item:AbstractLoader):void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function insert(item:AbstractLoader, index:int):void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function remove(item:AbstractLoader):void
    {
        throw new UnsupportedMethodException();
    }

    /**
     * Abstract method.
     */
    public function getChild(index:int):AbstractLoader
    {
        throw new UnsupportedMethodException();
    }
}

}
